
App({
  //当小程序初始化完成时，会触发 onLaunch（全局只触发一次）
  onLaunch: function () {
    // wx.setStorageSync("intoFlag", 0);
  },
  //扫用户码进入scene=用户编号，扫海报：scene=用户编码,海报编码
  
  globalData: {
    // httpsUrl: "http://127.0.0.1:8080/xcx",
    // httpsUrl: "http://192.168.3.5:8081",
    httpsUrl: "https://iotng.58shareiot.com/coupon-xcx-api",
    imgUrl: "https://iotng.58shareiot.com/yzsg-xcx-img",
    agentCode: "QTBkuxoQUG",     //代理商编码，小程序固定值
    AppID:"wx7afac69e6c1f702f",
    AppSecret:"06bcb6112726c8743af41076a2b74a24",
    contentType: "application/x-www-form-urlencoded",
    JSESSIONID:"JSESSIONID",
    parentCode: "parentCode",    //推荐用户编码
    businessCode: "businessCode",//商家编码
    posterCode:"posterCode",     //海报编码
    businessInfo:"businessInfo", //商家信息
    payGoods:"payGoods",         //下单商品集合
    goodsCode:"goodsCode",
    cardId:"cardId",             //联盟卡id
    posterInfo:"posterInfo",     //海报信息
    orderInfo:"orderInfo",
    code: "code",                //扫核销码参数：订单编码，劵编码，
    voucherInfo:"voucherInfo",   //劵信息
  },

  getJSESSIONID:function(){
    var JSESSIONID = wx.getStorageSync(this.globalData.JSESSIONID)
    return JSESSIONID;
  },

  //上拉触底事件
  onReachBottom: function () {
    let pageNo = this.data.pageNo;
    pageNo = pageNo + 1;
    if (pageNo > this.data.totalPage) {
      commonUtil.showSuccessToast("没有更多啦~");
      return;
    } else {
      this.setData({ totalPage: totalPage })
      this.list();
    }
  },

})